﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MediaPlayer
{
    public partial class Form2 : Form
    {
        public Form2()
        {
         
            InitializeComponent();
        }
        public string Dname;
       
        

        
        private void button1_Click(object sender, EventArgs e)
        {
            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {
                textBox1.Text = folderBrowserDialog1.SelectedPath;
                Dname = folderBrowserDialog1.SelectedPath;
            
            }

        }

        private void button2_Click(object sender, EventArgs e)
        {

            System.IO.StreamWriter file = new System.IO.StreamWriter(@"config.txt");
            file.WriteLine(Dname);
            file.Close();
            Form2.ActiveForm.Close();
        }
    }
}
